| 123456789101112 |
- import { NextRequest, NextResponse } from 'next/server';
- import { ResultDto } from '@/types/response/common';
- import { fetchJson } from '@/lib/utils/server';
- export async function GET(request: NextRequest, { params }: { params: Promise<{ path?: string[] }> }) {
- const { path } = await params;
- const subPath = path ? `/${path.join('/')}` : '';
- const endpoint = `/api/ranking${subPath}`;
- const url = new URL(request.url);
- const res: ResultDto = await fetchJson(`${endpoint}${url.search}`, { method: 'GET' });
- return NextResponse.json(res);
- }
|